package com.deviche.gank;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageView;

import com.bumptech.glide.Glide;

import static com.deviche.gank.MainActivity.URL;

public class ImageDetailActivity extends AppCompatActivity {

    private ImageView imageView;

    //增加炫酷动画与优化缓存等
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_details);
        imageView = findViewById(R.id.iv_details);
        Intent intent = getIntent();
        String url = intent.getStringExtra(URL);

        Glide.with(this).load(url).into(imageView);

    }
}
